/*  1:   */ package org.intellij.lang.regexp;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.editor.colors.TextAttributesKey;
import com.intellij.openapi.fileTypes.SyntaxHighlighter;
import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;
import com.intellij.openapi.options.colors.AttributesDescriptor;
import com.intellij.openapi.options.colors.ColorDescriptor;
import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.util.containers.HashMap;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.Map;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */
/* 14:   */ 
/* 15:   */ public class RegExpColorsPage
/* 16:   */   implements ColorSettingsPage
/* 17:   */ {
/* 18:35 */   private static final AttributesDescriptor[] a = { new AttributesDescriptor("Keyword", RegExpHighlighter.META), new AttributesDescriptor("Escaped character", RegExpHighlighter.ESC_CHARACTER), new AttributesDescriptor("Invalid escape sequence", RegExpHighlighter.INVALID_CHARACTER_ESCAPE), new AttributesDescriptor("Redundant escape sequence", RegExpHighlighter.REDUNDANT_ESCAPE), new AttributesDescriptor("Brace", RegExpHighlighter.BRACES), new AttributesDescriptor("Bracket", RegExpHighlighter.BRACKETS), new AttributesDescriptor("Parenthesis", RegExpHighlighter.PARENTHS), new AttributesDescriptor("Comma", RegExpHighlighter.COMMA), new AttributesDescriptor("Bad character", RegExpHighlighter.BAD_CHARACTER), new AttributesDescriptor("Character class", RegExpHighlighter.CHAR_CLASS), new AttributesDescriptor("Quote character", RegExpHighlighter.QUOTE_CHARACTER), new AttributesDescriptor("Comment", RegExpHighlighter.COMMENT) };
/* 19:   */   @NonNls
/* 20:50 */   private static final HashMap<String, TextAttributesKey> b = new HashMap();
/* 21:   */   
/* 22:   */   @NotNull
/* 23:   */   public String getDisplayName()
/* 24:   */   {
/* 25:54 */     String tmp2_0 = "RegExp";
/* 26:54 */     if (tmp2_0 == null) {
/* 27:54 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpColorsPage", "getDisplayName" }));
/* 28:   */     }
/* 29:54 */     return tmp2_0;
/* 30:   */   }
/* 31:   */   
/* 32:   */   public Icon getIcon()
/* 33:   */   {
/* 34:58 */     return RegExpFileType.INSTANCE.getIcon();
/* 35:   */   }
/* 36:   */   
/* 37:   */   @NotNull
/* 38:   */   public AttributesDescriptor[] getAttributeDescriptors()
/* 39:   */   {
/* 40:63 */     AttributesDescriptor[] tmp3_0 = a;
/* 41:63 */     if (tmp3_0 == null) {
/* 42:63 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpColorsPage", "getAttributeDescriptors" }));
/* 43:   */     }
/* 44:63 */     return tmp3_0;
/* 45:   */   }
/* 46:   */   
/* 47:   */   @NotNull
/* 48:   */   public ColorDescriptor[] getColorDescriptors()
/* 49:   */   {
/* 50:68 */     ColorDescriptor[] tmp3_0 = ColorDescriptor.EMPTY_ARRAY;
/* 51:68 */     if (tmp3_0 == null) {
/* 52:68 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpColorsPage", "getColorDescriptors" }));
/* 53:   */     }
/* 54:68 */     return tmp3_0;
/* 55:   */   }
/* 56:   */   
/* 57:   */   @NotNull
/* 58:   */   public SyntaxHighlighter getHighlighter()
/* 59:   */   {
/* 60:73 */     SyntaxHighlighter localSyntaxHighlighter = SyntaxHighlighterFactory.getSyntaxHighlighter(RegExpFileType.INSTANCE, null, null);
/* 61:74 */     assert (localSyntaxHighlighter != null); SyntaxHighlighter 
/* 62:75 */       tmp28_27 = localSyntaxHighlighter;
/* 63:75 */     if (tmp28_27 == null) {
/* 64:75 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpColorsPage", "getHighlighter" }));
/* 65:   */     }
/* 66:75 */     return tmp28_27;
/* 67:   */   }
/* 68:   */   
/* 69:   */   @NotNull
/* 70:   */   public String getDemoText()
/* 71:   */   {
/* 72:80 */     String tmp2_0 = "^[\\w\\.-]+@([\\w\\-]+\\.)+[A-Z]{2,4}\\x0g\\#\\p{alpha}\\Q\\E$";
/* 73:80 */     if (tmp2_0 == null) {
/* 74:80 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpColorsPage", "getDemoText" }));
/* 75:   */     }
/* 76:80 */     return tmp2_0;
/* 77:   */   }
/* 78:   */   
/* 79:   */   public Map<String, TextAttributesKey> getAdditionalHighlightingTagToDescriptorMap()
/* 80:   */   {
/* 81:86 */     return b;
/* 82:   */   }
/* 83:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.RegExpColorsPage

 * JD-Core Version:    0.7.0.1

 */